<div [formGroup]="form">
  <!-- <nz-form-item *ngIf="!(record.options.hidden === true) &&
  [
    'input',
    'textarea',
    'date',
    'time',
    'number',
    'radio',
    'checkbox',
    'select',
    'rate',
    'switch',
    'slider',
    'uploadImg',
    'uploadFile',
    'cascader',
    'treeSelect'
  ].includes(record.type)"
    [ngStyle]="{}"> -->
    <!-- TODO 样式options配置 -->
      <ng-container [ngSwitch]="record.type">
        <ng-container *ngSwitchCase="'input'">
          <input nz-input [formControlName]="record.key"/>
        </ng-container>
        <ng-container *ngSwitchCase="'textarea'">
          <textarea nz-input [formControlName]="record.key"></textarea>
        </ng-container>
        <ng-container *ngSwitchCase="'number'">
          <nz-input-number [formControlName]="record.key"></nz-input-number>
        </ng-container>
        <ng-container *ngSwitchCase="'radio'">
          <app-design-form-item-radio [formControlName]="record.key" [record]="record"></app-design-form-item-radio>
        </ng-container>
        <ng-container *ngSwitchCase="'checkbox'">
          <!-- <nz-checkbox-group [ngModel]="record.options.options" (ngModelChange)="log($event)"></nz-checkbox-group> -->
          <app-design-form-item-checkbox [formControlName]="record.key" [options]="record.options.options"></app-design-form-item-checkbox>
        </ng-container>
        <ng-container *ngSwitchCase="'date'">
          <app-design-form-date-picker [formControlName]="record.key" [record]="record"></app-design-form-date-picker>
        </ng-container>
        <ng-container *ngSwitchCase="'select'">
          <nz-select style="width: 90%;" [formControlName]="record.key">
            <nz-option *ngFor="let lbl of record.options.options" 
              [nzValue]="lbl.value" [nzLabel]="lbl.label"></nz-option>
          </nz-select>
        </ng-container>
        <ng-container *ngSwitchCase="'uploadCustom'">
          <app-design-form-upload-custom [formControlName]="record.key" [record]="record"
            [insideTable]="true" 
            (previewOutput)="previewOutput.emit($event)"></app-design-form-upload-custom>
        </ng-container>
      </ng-container>
  <!-- <ng-container *ngSwitchCase="'divider'">
    <nz-divider [nzText]="record.label" [nzOrientation]="record.options.orientation || 'center'"></nz-divider>
  </ng-container> -->
</div>